//
//  EJSHomeBannerView.m
//  EnjoyShoppingStreet
//
//  Created by lifayu on 2017/12/14.
//  Copyright © 2017年 lifayu. All rights reserved.
//

#import "EJSHomeBannerView.h"

@implementation EJSHomeBannerView

- (id)init{
    return [self initWithFrame:CGRectZero];
}


- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        [self addOwnViews];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder{
    self = [super initWithCoder:aDecoder];
    if(self){
        [self addOwnViews];
    }
    return self;
}

- (void)addOwnViews{
    self.cycleScrollView = [[SDCycleScrollView alloc] initWithFrame:CGRectZero];
    self.cycleScrollView.infiniteLoop = YES;
    self.cycleScrollView.autoScrollTimeInterval = 5;
    [self addSubview:self.cycleScrollView];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.cycleScrollView.frame = CGRectMake(0, 15, self.width, self.height - 15);
}

@end
